<?php

if (!function_exists('sampleIsInstalled'))
	return die('Module "Sample" is not installed.');

echo sampleIsInstalled(), '<br>';

echo '<p><b>Testing \\fnTestingArgs("a")</b><p>';

fnTestingArgs("a");

echo '<p><b>Testing \\fnTestingArgs("a", 2333)</b><p>';

fnTestingArgs("a", 2333);

echo '<p><b>Testing \\sample\\fn\\fnNSTester(2.6)</b><p>';

$v = \sample\fn\fnNSTester(2.6);

echo '<br>And it\'s output is ', $v, '<br>';

# Testing Constants.

echo '<p><b>Testing Constants:</b></p>';

echo 'SAMPLE_TEST_LONG=', SAMPLE_TEST_LONG, '<br>';

echo 'SAMPLE_TEST_LONG64=', SAMPLE_TEST_LONG64, '<br>';

echo 'SAMPLE_TEST_STRING=', SAMPLE_TEST_STRiNG, '<br>'; # not case sensitive

echo 'SAMPLE_TEST_STRING2=', SAMPLE_TEST_STRING2, '<br>';

echo 'SAMPLE_TEST_BOOL=', var_dump(SAMPLE_TEST_BOOL), '<br>';

echo '\\sample\\consts\\TEST_LONG_VALUE=', \sample\consts\TEST_LONG_VALUE, '<br>';

echo '\\sample\\consts\\TEST_STRING_VALUE=', \sample\consts\TEST_STRING_VALUE, '<br>';

echo '\\sample\\consts\\TEST_STRING2_VALUE=', \sample\consts\TEST_STRING2_VALUE, '<br>';

echo '\\sample\\consts\\TEST_STRING2_VALUE=', var_dump(\sample\consts\TEST_BOOL_VALUE), '<br>';

# Testing Class Sample.

echo '<p><b>Testing Class Sample:</b></p>';

$v = new Sample(Sample::TYPE_DOLLAR, 0.15);
$v->payment = 5000;
echo $v->getType(), ': ', $v->getPayment(), ' (Payment: ', $v->payment, ', Tax: ', ($v->tax * 100), '%)<br>';

$v->payment = 7000;
$v->tax = 0.02;
echo $v->getType(), ': ', $v->getPayment(), ' (Payment: ', $v->payment, ', Tax: ', ($v->tax * 100), '%)';


